<!DOCTYPE html>
<html lang="en">

<script src="../js/vue.js"></script>
<script src="../element-ui/lib/index.js"></script>
<link rel="stylesheet" href="../element-ui/lib/theme-chalk/index.css">

<head>
    <meta charset="UTF-8">
    <title>帖子详情</title>
</head>
<body>
<div id="app">
    <h1>{{posts.title}}</h1>
    <hr/>
    <h4>{{posts.content}}</h4>
    <hr/>
    <div v-for="r in reply">
        <h5>{{r.content}}</h5>
        <h5>{{r.repitTime}}</h5>
    </div>
</div>
</body>

<script>
    new Vue({
        el: "#app",
        data: {
            posts: {
                id: "",
                title: "",
                content: "",
                viewCount: "",
                releaseTime: "",
                lastTime: "",
                userId: ""
            },
            reply: {
                id: "",
                repitTime: "",
                content: "",
                userId: "",
                postId: ""
            }
        },
        methods: {
            replyList(){
                var _this = this;
                axios({
                    method: "get",
                    url: "http://localhost:8080/javaweb/app/getByPostsIdServlet?id='+_this.post.id"
                })
            }
        }

    })
</script>
</html>